package com.siyuanren.gcocp.common.web.vo;

import com.siyuanren.gcocp.consts.GcocpConsts;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author guwr
 */
@Getter
@Setter
public class BaseVO implements Serializable {

    private static final long serialVersionUID = 1070725988255670L;
    private Integer pageNum;
    private Integer pageSize;
    private Integer userId;

    public Integer getPageNum() {
        if (pageNum == null || pageNum <= GcocpConsts.ONE) {
            pageNum = GcocpConsts.ONE;
        }
        return pageNum;
    }

    public Integer getPageSize() {
        if (pageSize == null || pageSize <= GcocpConsts.ZERO) {
            pageSize = GcocpConsts.TEN;
        }
        return pageSize;
    }
}
